package com.mark.web.bill.mapper;

import com.mark.web.bill.entity.dto.GoodsDetail;
import com.mark.web.bill.entity.po.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: 加工零件dao接口定义
 * @Author: Kingsley: 08：46
 * @CreateDate: 2019/1/31 15:14
 * @Version: 2.0
 * @Copyright : 豆浆油条个人非正式工作室
 */
public interface GoodsMapper {

    int insert(Goods record);

    int deleteByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Goods record);

    Goods selectByPrimaryKey(Integer id);

    List<Map<String, Object>> selectAllGoodsByCate(@Param("categoryId") Integer categoryId);

    /**
     * 搜索加工零件列表信息
     * @param categoryId ：种类id
     * @param currentUserId ：当前用户id
     * @param searchGoodsName ：搜索的加工零件名称
     * @return ：
     */
    List<GoodsDetail> searchGoodsDetailList(@Param("categoryId") Integer categoryId,
                                            @Param("currentUserId") Integer currentUserId,
                                            @Param("searchGoodsName") String searchGoodsName);

   GoodsDetail searchGoodsDetail(Integer id);


}